﻿namespace FileStorageCenter.Services.Models;

/// <summary>
/// 文件信息
/// </summary>
[DisplayName("文件信息")]
public partial class FileInfo : EntityBase
{
    /// <summary>
    /// 文件ID
    /// </summary>
    [DisplayName("文件ID")]
    [MaxLength(64)]
    public string FileId { get; set; } = string.Empty;

    /// <summary>
    /// 访问链接
    /// </summary>
    [DisplayName("访问链接")]
    [MaxLength(256)]
    public string Url { get; set; } = string.Empty;

    /// <summary>
    /// 组名
    /// </summary>
    [DisplayName("组名")]
    [MaxLength(8)]
    public string GroupName { get; set; } = string.Empty;

    /// <summary>
    /// 文件名
    /// </summary>
    [DisplayName("文件名")]
    [MaxLength(256)]
    public string Name { get; set; } = string.Empty;

    /// <summary>
    /// 文件扩展
    /// </summary>
    [DisplayName("文件扩展")]
    [MaxLength(16)]
    public string Extension { get; set; } = string.Empty;

    /// <summary>
    /// 文件大小
    /// </summary>
    [DisplayName("文件大小")]
    public long Size { get; set; }

    /// <summary>
    /// 由谁上传
    /// </summary>
    [DisplayName("由谁上传")]
    public User AddedBy { get; set; } = null!;

    /// <summary>
    /// 哈希值
    /// </summary>
    [DisplayName("哈希值")]
    [MaxLength(32)]
    public string Hash { get; set; } = string.Empty;
}